/*
 *
 * Created on: 22.09.2012
 *
 * config_p.h
 * This file is part of KOBUS
 * 
 * Copyright (C) 2012 - Ivan Penkin, MIPT
 * grek.penkin@gmail.com
 *
 * KOBUS is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * KOBUS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with KOBUS; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 *  
 */

#ifndef CONFIG_P_H_
#define CONFIG_P_H_

#include <config.h>

#include <qstring.h>
#include <qmap.h>

namespace kobus {

class ConfigPrivate: public QObject
{

    Q_OBJECT

  public:
    ConfigPrivate(const QString & /* cfgPath */, QObject * parent = 0);

    virtual
    ~ConfigPrivate();

    void read() throw (Exception);
    bool contains(const QString & /* key */) const;
    const QString getString(const QString & /* key */) const throw(Exception);

    QList<QString> keys() const;

  protected:
    QString d_path;
    QMap <QString, QString> d_contents;

  private:
     Q_DISABLE_COPY(ConfigPrivate);

     explicit
     ConfigPrivate(QObject * parent = 0);
};


} /* namespace kobus */

Q_DECLARE_TYPEINFO(kobus::ConfigPrivate, Q_COMPLEX_TYPE);

#endif /* CONFIG_P_H_ */
